package com.hyfrogx.modules.information.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hyfrogx.modules.information.entity.InfoSource;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author liubin
 * @date 2019/11/1 10:25
 */
@Mapper
public interface InfoSourceDao extends BaseMapper<InfoSource> {

  @Select("select \n" +
    "\t\tsid\n" +
    "       \tFROM\n" +
    "      \tinfo_source\n" +
    "\t\twhere\n" +
    "\t\tid = #{id,jdbcType=INTEGER}\n")
  List<Integer> getapkById(@Param("id") Integer id);

  /*@Insert("insert into info_source (id,sid) values\n" +
    "\t\tforeach\n" +
    "\t\t\t(#{id,jdbcType=INTEGER}, #{item,jdbcType=INTEGER})\n" )*/
  void inserts(Integer id,  Integer[] channelIds);
}
